in what version of lime openfl it works? i’m working in a old version, maybe it will work for me?
This isn’t ideal because of course ideally SampleDataEvent should be implemented. It would help me a lot if it was. But here’s an example I made for one of my libs demonstrating a synth working on top of openal using NativeChannel from heaps:
The key file is here:
Alas, I can’t remember what version it was.
But I have good news, it still works with OpenFL 8.0.1! There’s just one line that needs to be changed:
We need to change it to this:
if (SoundMixer.__soundChannels.length >= SoundMixer.MAX_ACTIVE_CHANNELS) {
Reason is simple - if we just use the Sound object to listen for a SampleDataEvent, __buffer will be null upon initialization and the events won’t ever get fired.
This pattern is the music we hear? How do you lear to do that? i mean to compose inthat array the music?:
patterns.push(["g-2|g-4", "", "", "a-4", "a#4", "", "d-2|a-4", "", "g-4", "", "f-4", "", "g-2|g-4", "", "d-4", "", "", "", "", "", "", "", "d-4", "", "g-2|g-4", "", "", "a-4", "a#4", "", "c-2|c-5", "", "a#4", "", "c-5", "", "d-2|d-5", "", "", "", "", "", "", "", "", "", "d-5", ""]);
finally have time to test your changes, and is working just fine!
It’s a bit abstract, isn’t it?
I’ve been using arrays to create music since the glory days of my TI-99/4a, so I’m quite
used to it. However, since the whole sequencer in this example is heavily based on
the .mod format, I’ve used a tracker to compose the melody and merely wrote down the notes
into the array afterwards.
“a#4” this is a note that i understand
"" this is silence maybe?
g-2|g-4 that i dont understand
Where goes the tempo?
i’ve also tested the changes proposed by obscure, seem to be working really well. any chance of integrating them in the release?
This is working real great now!
Any one knows how to make envelope for the whitenoise/percusion ?