|
Post by reezekeys on Nov 28, 2021 16:14:29 GMT
Hi, first post here. I got StreamByter for iOS a while back, and now have a use for it! I'm an old-timer getting into using my iPad with AUM and some iOS virtual instruments on gigs rather than bringing my MacBook Pro. I have some very limited programming experience and it looks like getting a handle on the right syntax might be slightly above my pay grade so I would appreciate any help. I would like to create a note velocity remapper that does what's shown in the pic below. Essentially, it adds a variable amount to velocities depending on the input velocity. As you may be able to tell from the pic, I'm adding about 20 to the velocities at the low end (where input velocity = 1) but gradually less as I get to higher values. At input velocity = 127, I add 0 to the number. At vel = 64 I would be adding 10. It's a straight linear function. My math skills ended in high school but I did come up with a formula that seems to work on paper: v = v + ((127 - v) (.157)). Plug in "1" for v and you get 20 added to v, and when v = 127 the number added is 0. The question is how to implement this in StreamByter. I did look through the documentation some, and I know I should "RTFM" more in hopes of figuring this out, but I have a gig coming up soon and would love to have this happening!! Any help is very much appreciated, thanks! 
|
|
|
Post by uncledave on Nov 29, 2021 0:37:48 GMT
Hi reezekeys , You may be in luck because I have already done this, and use it every day. Download the attached Velocity_ratio.sbr.zip, unzip it, and you should be able to share it directly to StreamByter. You would need to save it to iCloud if you need to access it from SB AUv3. Otherwise, you can just save it locally. The minimum point is encoded as $128/Base, where you enter the Base from a menu. To lift velocity 0 to about 20, you'd need Base of 6. I generally use a Base of 8, which works well for my keyboard and instruments. The calculation in the code is carefully rounded, and uses only integer arithmetic.
BTW, if you're using SB in a host, like Audiobus or AUM, the script is stored as part of a host preset, so when you load the preset, it's ready to go, no messing around. I used "+P" when initializing the Base value, so it is restored to its previous setting. Don't need to do that for the derived parameters, since they're regenerated at startup.
I hope you enjoy StreamByter, because it's a wonderful program.
(Edited to clarify storing.)
Cheers, Dave
Velocity_ratio.sbr.zip (984 B)
|
|
|
Post by reezekeys on Nov 29, 2021 16:55:04 GMT
Dave, thanks a million! This works great. You have no idea how much this helps. Korg Module has a velocity remapper (that's what my pic is) but for some reason it's only available in AUM if you load it in IAA mode; loaded as an AUv3, the velocity remapper is not there! It's much more useful to have Module be an AUv3 so this really helps a lot.
Now I'm gonna study your code and try to understand this great software better. One thing I could not figure out was how to load your preset directly. First I downloaded it to my Mac then airdropped it to my iPad. Then I moved it to my iCloud drive. Then I tried downloading it from my iPad. In no case was I able to see your preset file in the AUv3 instance of StreamByter. I wound up loading it into the standalone iOS StreamByter, then just copied & pasted the code into my AUv3 instance. I saved it locally from there so I should be good. Thanks again!
|
|
|
Post by uncledave on Nov 29, 2021 18:07:17 GMT
Yer quite welcome!
Yes, you're discovering the mysteries of StreamByter file management. The SB local storage (On my iPad) is visible in Files; you could have dropped the file in there. The StreamByter iCloud drive storage is not visible; only SB can acess it, and it's the only storage shared by stand-alone and AU versions (Local storage is separate). If you load rhe script in stand-alone (as you did), you can save it from there to iCloud. StreamByter must be enabled on the iCloud settings page under your Apple ID, and iCloud Drive must be enabled. (I prefer not to use iCloud Drive, so I turn off all the other apps.) Once you've done that, and you tap on the hamburger menu at the bottom on SB stand-alone, you'll see "iCloud is available" at the top, and you can save the script there. Then, you can load it in the AU. It's easy once you get the hang of it.
Also, a little warning. If you edit a script, you must Install Rules before saving. Otherwise, edits will be lost.
Edit: Incidentally, my equation is basically the same as yours; same straight line, after all. I just built it to maximize precision, and get the rounding right. This requires saving the truncating integer division until the end.
Cheers, Dave
|
|
|
Post by reezekeys on Dec 1, 2021 3:35:19 GMT
Dave, thanks for explaining this. I did see "iCloud available" and StreamByter was enabled in my iCloud prefs, but as I didn't realize it was invisible, I couldn't understand why nothing was showing up in the iCloud folder on my Mac! I have it together now. I even wrote my own very first StreamByter script from scratch - NX XX XX = XX XX 7F, to force all note velocities to 127. It only took about ten tries before I stopped seeing the red "ERR", ha ha!
|
|
|
Post by uncledave on Dec 1, 2021 12:54:04 GMT
I hear you on the red ERR! The worst is missing an End somewhere. The entire script in wrong, with no indication as to where. You just have to carefully count through to notice where to insert the missing one.
Your rule could begin with 9X instead of NX, if you only want to rewrite Note On velocities. Some apps actually make a sound for non-zero release velocity. Like the clunk when you sharply drop keys on a piano.
|
|
|
Post by reezekeys on Dec 16, 2021 18:39:38 GMT
Sorry for the late reply - I took your suggestion and changed "NX" to "9X", thanks. I'm still trying to find a decent iOS acoustic piano, and fairly sure any one I get is going to need velocity remapping to make feel right in my clumsy hands. I have a feeling I'll be exploring SB a lot more in the near future! Another piano I'm interested in (the Colossus "Japanese Grand"), similar to Korg's Module, does not expose its own velocity scaling screen when loaded into an AUv3 host. Thanks again for your helpful script!
|
|
|
Post by uncledave on Dec 17, 2021 11:20:55 GMT
There are some nice piano soundfonts at Soundfonts 4U. You can play them with the SoundFonts app, stand-alone and AUv3. They're worth a look. No built-in velocity mapping, of course.
|
|
|
Post by reezekeys on Dec 17, 2021 17:45:46 GMT
I've checked some of those out, thanks. I thought I had a way to play them on my iPad but the app I got (AudioLayer) seems to support .sfz files, not .sf2. I guess I need another app, or a way to convert the format if that's doable.
[edit] I see sforzando will convert .sf2 to .sfz, I'll give that a try!
|
|
|
Post by uncledave on Dec 17, 2021 19:08:28 GMT
I've checked some of those out, thanks. I thought I had a way to play them on my iPad but the app I got (AudioLayer) seems to support .sfz files, not .sf2. I guess I need another app, or a way to convert the format if that's doable. [edit] I see sforzando will convert .sf2 to .sfz, I'll give that a try! Or you can use the SoundFonts app to play them directly. That's actually the app name.
|
|
|
Post by reezekeys on Dec 17, 2021 19:58:13 GMT
I wanted to exhaust the possibilities using the apps I already have. AudioLayer is an excellent app that lets you get pretty deep into programming sampled instruments. I can play .sf2 sounds on my Mac, so if I hear a piano I really like and can't get it going with AudioLayer, I'll grab SoundFonts. Thanks for the suggestion!
|
|
|
Post by uncledave on Dec 24, 2021 18:37:47 GMT
reezekeys. I've made an update to Velocity_ratio that may interest you. Happened to see a YouTube video talking about the Yamaha MODX, and how the piano sounded thin. The poster said that the demo piano sound was much fuller and he wondered why. He looked into it and found they used a simple Velocity Offset, just adding a constant to the velocity (and limiting the maximum, of course). This is simpler than what Velocity_ratio does, since it keeps the same slope. This brings moderate velocities much closer to maximum. I tried it, and I think it works. The attached Velocity_ratio01.zip includes this feature. If the Offset slider is greater than zero, it just implements the offset. If the Offset is zero, it works as before. Please try it if you're interested, and let me know what you think. Cheers, Dave
|
|
|
Post by reezekeys on Dec 26, 2021 15:17:18 GMT
Thanks Dave, I'll check this out soon! I'm glad I came back here, I didn't have my prefs set to email me when someome replies - that's changed.
I'll give this new script a try but I think your original is better suited for me. According to your description, the resulting velocities will reach 127 before the actual velocities I'm sending get there – at least that's how I'm reading it. The issue I have is that my piano barely sounds at all when I'm sending the lower end of velocities, but the top end is fine.
|
|
|
Post by uncledave on Dec 26, 2021 17:08:34 GMT
Thanks Dave, I'll check this out soon! I'm glad I came back here, I didn't have my prefs set to email me when someome replies - that's changed. I'll give this new script a try but I think your original is better suited for me. According to your description, the resulting velocities will reach 127 before the actual velocities I'm sending get there – at least that's how I'm reading it. The issue I have is that my piano barely sounds at all when I'm sending the lower end of velocities, but the top end is fine. Cheers. I was about to PM you. Yes, the velocity reaches 127 before you do, but it's almost impossible to send those high velocities with a normal keyboard. Velocity Offset lets you get a big sound without pounding the keys. Give it a try. I think you'll be impressed. Check out the MODX demo I saw, www.youtube.com/watch?v=8VbMzParso8
|
|
|
Post by reezekeys on Dec 27, 2021 14:40:15 GMT
Dave, I just checked out that video. I've put a lot of thought and time into my acoustic piano sound and my controller settings, and imo the approach in that video doesn't work for what I do. I play more jazz stuff and need to play softer, but at the same time I also occasionally need those higher velocities' samples too. The approach in that video works for the guy demoing because he likes that "in your face" sound (as he puts it). It would be impossible for me to play a nice ballad like that. My regular rig is a laptop with Kontakt playing their Grandeur piano (a Steinway), which has multiple sample layers. My controller is a Roland A-Pro, and it has three dynamic "sensitivity" settings in addition to velocity curve settings - "light", "medium" and "heavy", which corresponds to a player's touch. It appears - from a quick reading of the MODX manual I saw online – that the MODX lacks this setting; it has only curve settings. That means a player with a heavy touch is going to reach the 120s quickly, or a player with a light touch is never going to get to those upper velocities. Curves by themselves can help a little (mostly with the lighter-touch folk), but can't fix this. IMO you need to start with a keyboard that can represent your own playing force from ppp to fff with as much of the 1 - 127 range as possible – then use the curves to tailor the sound you're playing. Of course, it's how it feels to you that matters, and if offsetting velocities works for you, then it's end of discussion! I'm only relating what I've found to work for me and the kinds of music and gigs I do.
|
|