Re-use sounds from the SoundFX Generator with the USB keyboard
-
Hint: The auto-repeat time between a key press and its re-appearing in the key buffer, is different if you are already holding down another key.
Started to do this with 24 keys on the keyboard. My idea was to be able to play a chord and hold 3 notes at the same time, when 3 keys are hold down.
Then I found out that "a_____________________________a______a" is how this looks like, when "a" is hold down--> the keybuffer is empty from 2nd to 29th frame.
But for two keys pressed right after each other: "a_____b_______________________ab______ab", the key "b" is not repeated after its 29th frame but already together with 'a'. So, if the key buffer is already in the mode of "ready to repeat", every key is immediately part of the 29th frame after the first key press.
Gosh. So, you will not be able to hold one tone, and playing staccato with another tone at the same time.
I think its time to simplify the target and accept some limits.Possible solution, if people are doing more keyboard-related projects, would be a feature to set the auto-repeat time of a key: setKeyboardAutoRepeat(time) if set to 0 the keys are not repeated if hold down. If set to 1 the key is always part of the keyboard buffer, until released. If set to 29 its working as is.
-
I did an attempt to record notes, from key presses. Seems to make the tool a bit interesting. This is a test when I recorded a base line and let it play. Meanwhile I press some new keys on top of it. (I just saw, that the volume mastering is awful, listen to it in twitter. I will have to compare the volumes a bit between headphones, TV and recorded video)
Hint: If you apply a modulator it will use up more, than one channel to play a note. So, you will not be able to play up to 16 notes, without creating noise instead of tones.
-
Good hint thanks for that.
-
@spikey I just found out that I was re-inventing the wheel here, @Nisse5 did explore this functions already heavily. Hope the Sound FX Generator related information may still be of some use.
-
-
After getting distracted by all the directions this project could go, I focused back on the main idea, why I built this: experimenting as efficient as possible with all synthesizer parameters to find sounds that would allow to come up with more self made music. My vision is to create a game soundtrack by myself.
Release notes, 6th May 2020 ;-)- direct parameter input is possible (Y-button, or "P" key)
- added "ratio" parameter for the modulation: it dynamically sets the modulation frequency in relation to the note (carrier frequency)
what results in a better harmony of the modulation (I guess? Any expert or tester comment on that assumption is welcome) - random note can be played, for quickly checking the effect of a paramter change (A-button)
- browse through the sounds with L and R-button
- switch octaves with ZL and ZR-button
As the experimenting process is now more efficient than before, I hope I manage to achieve to provide some sounding instruments. I did not store any pre-saved sounds as a file, only in code. So, if you redownload a later version, your own created sounds will not be overwritten.
-
@spikey forgive my noobness with this is it possible to track what you play then when you return to the editor are you able to copy and paste to use as a sound track in another program?
-
@waldron Currently you can record with "."-key and playback with "0" (not documented yet). For a start.
For the "re-use the song info"-use case I was thinking a lot. The main issue is "copy and paste" is not possible from one running-program (like writing to the clipboard) to another program open in the editor. So, either I show the code on screen and one has to type it afterwards or I save it in a file and the game has to be copied into this program and replace the "Musical USB Keyboard" code (then the file would already be here). Any better ideas are welcome. -
@spikey im fine writing it down to be honest, i prefer to play and hear it as i play instead of inputting notes then hear the out come if that makes sense. i thought it might be possible to use persistent data but i have no idea how that works
-
@waldron Programmatic clipboard access is certainly on the feature request list but not for the next patch unfortunately
-
@spikey I want one of these. I have just come to realise that coding tunes in the editor is a bit too much trouble. Good luck with this.
-
Updated: loading custom sounds, correctly loads the wave type.
ID USS73MNDN8, check the description, if there are changes from today, it contains the fixes. Downloading the new version will not overwrite your custom sounds.