If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Ruby Script Midi Out Problem (For Random Output)
16 posts
• Page 1 of 2 • 1, 2
Ruby Script Midi Out Problem (For Random Output)
I'm trying to switch oscillators based on ruby random function and it's working but the sounds are ignoring the envelopes or something. I end up with sounds being switched but the notes are sustaining for way too long and creating an overlapping mess and also overloading the CPU. Can anybody solve this bug or at least explain why the gate is not working for the ADSR ? Thanks.
out = rand(0..2)
output out, @in
That's the code so far. Randomize numbers between 0 and 2 and then send the midi input to the output that has that number. Simple. Right ? I guess not. Because it's not doing it 100% properly or something.
out = rand(0..2)
output out, @in
That's the code so far. Randomize numbers between 0 and 2 and then send the midi input to the output that has that number. Simple. Right ? I guess not. Because it's not doing it 100% properly or something.
- Attachments
-
- Wavestate Synth 0002.fsm
- (47.24 KiB) Downloaded 1071 times
Last edited by DSP-Robotron on Wed Aug 19, 2020 6:58 am, edited 1 time in total.
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
Re: Ruby Script Midi Out Problem (For Random Output)
This one works a bit better but it's only masking the problem.
- Attachments
-
- Wavestate Synth 0004.fsm
- (47.18 KiB) Downloaded 1078 times
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
Re: Ruby Script Midi Out Problem (For Random Output)
Try an ASIO driver instead of DS Out.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Ruby Script Midi Out Problem (For Random Output)
Here is a more advanced version of it if you guys want it but it still needs way more tone generators.
At least 8 samples or tones per Arpeggiator.
Now it has 2 of those.
It's still very buggy somehow because the CPU load is 10 times higher than what is supposed to be.
At least 8 samples or tones per Arpeggiator.
Now it has 2 of those.
It's still very buggy somehow because the CPU load is 10 times higher than what is supposed to be.
- Attachments
-
- Wavestate Synth 0005.fsm
- (125 KiB) Downloaded 1079 times
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
Re: Ruby Script Midi Out Problem (For Random Output)
I'm surprised that nobody answered you already!
When a note is played, two midi massages will be sent. One at the start (a Note On message) and one, when the note has to end (a Note Off message).
You currently re-route any incoming message to a random output, which means that the Note Off that belongs to the Note On you re-routed to output 2 may be sent to output 3. Sometimes, that's the nature of randomness, the Note Off message arrives at the correct output. The result being that it sometimes works and sometimes not.
What you have to do is keeping track of every Note On message and the output, you sent it to. Then, when a matching Note Off arrives, look up where it needs to be send, and send it there, bypassing the randomization.
Note On and Note Off are not the only midi messages that are grouped. You also have to be careful with pitchbend messages, polyphonic aftertouch, channel pressure and system exclusives.
When a note is played, two midi massages will be sent. One at the start (a Note On message) and one, when the note has to end (a Note Off message).
You currently re-route any incoming message to a random output, which means that the Note Off that belongs to the Note On you re-routed to output 2 may be sent to output 3. Sometimes, that's the nature of randomness, the Note Off message arrives at the correct output. The result being that it sometimes works and sometimes not.
What you have to do is keeping track of every Note On message and the output, you sent it to. Then, when a matching Note Off arrives, look up where it needs to be send, and send it there, bypassing the randomization.
Note On and Note Off are not the only midi messages that are grouped. You also have to be careful with pitchbend messages, polyphonic aftertouch, channel pressure and system exclusives.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Ruby Script Midi Out Problem (For Random Output)
That's a very good point but how can I make sure the signals go to the correct target ?
Isn't it possible to just send notes off messages to everything/everywhere at the end of every arpeggio cycle ?
That would guarantee a good reset of each cycle.
Isn't it possible to just send notes off messages to everything/everywhere at the end of every arpeggio cycle ?
That would guarantee a good reset of each cycle.
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
Re: Ruby Script Midi Out Problem (For Random Output)
As Tulamide says (and Spogg in another thread), the Note Off messages may go to the wrong output. A quick dirty hack would be to route Note Off messages generaly to all outputs - it would do no harm except for the extra processing load. But then still the other problems in Tulamide's response would remain. To do it right you would need some bookkeeping...
If all you want is a random timbre for each new note, you could do the assignment in the poly section thus avoiding extra instances of MIDI/Voices prims, ADSR modules, etc. You would also not waste GUI real estate.
If all you want is a random timbre for each new note, you could do the assignment in the poly section thus avoiding extra instances of MIDI/Voices prims, ADSR modules, etc. You would also not waste GUI real estate.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Ruby Script Midi Out Problem (For Random Output)
I have no idea how the poly section works yet. The polyphony was set at 32 when I only need 1 or 3. Maybe some simplified example file would work better. I only need sample switching at each step in the most efficient way because the CPU load is pretty high already and the sustaining notes keep accumulating until it crashes.
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
Re: Ruby Script Midi Out Problem (For Random Output)
This version seems to work better but is not using the samplers.
- Attachments
-
- 3x OSC 3x Arp Basic Synth v003.fsm
- (108.72 KiB) Downloaded 1057 times
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
Re: Ruby Script Midi Out Problem (For Random Output)
Solved. I think.
I had to modify the Arp code but this version seems to work better.
Does anybody know how to make the Open button visible on the Wave Player ?
It's not allowing to load samples from the front panel.
I had to modify the Arp code but this version seems to work better.
Does anybody know how to make the Open button visible on the Wave Player ?
It's not allowing to load samples from the front panel.
- Attachments
-
- 3x OSC 3x Arp Basic Synth v006.fsm
- (122.9 KiB) Downloaded 1046 times
Download plugins here:
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
https://mega.nz/folder/nhVCkQRA#UWgU06K1o9gRFI0WqnBw_w
- DSP-Robotron
- Posts: 58
- Joined: Tue Aug 18, 2020 3:39 am
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: Google [Bot] and 83 guests