playNoteWithStartOffset
-
@d-healey oh ok that bits fine then, how do I assign as tart sample of (lets say) 623458 using this modulator approach?
-
@Lindon said in playNoteWithStartOffset:
@d-healey oh ok that bits fine then, how do I assign as tart sample of (lets say) 623458 using this modulator approach?
No idea, which is why I didn't answer that bit :p I've only used unspecific offsets in my projects so far.
-
You can of course set sample properties programatically. There's a blog post called "Fun with Regex" that explains this.
If you use the modulator approach, the 0...1 value is converted to the samplestart mod range available in the sample that's about to start.
If you set them all to 623458, then just return 1.0 :)
-
@Christoph-Hart fine but setting something to a fixed sample position is not really much use to me, let me explain:
My instrument has a wav file its 4 bars at a tempo (lets say) 120 bpm. OK its a loop and I want to divide this down into "steps" - 32 of them.
The user presses play and now I need to play this loop - but I want to do so by playing slices of the wav file - so I can reorder the slices, and change tempos during the song.
Lets assume for the minute the selected pattern is the following: 1,2,3,4,5,6,7...32 - so just sequential
So first slice is easy thats at 0 offset
so playNote with a zero offset..
--- Now I have to calculate a point to send a NoteOff but thats another story...Next slice is at (file_length in samples/32) *1
So playNote with offset (file_length in samples/32) *1
next note:
playNote with Offset (file_length in samples/32) *2
next note:
playNote with Offset (file_length in samples/32) *3
etc.
This is all pretty easy to do in Kontakt... Kontakt will tell me the file_length in samples when I want it,
Kontakt will let me:play_note(60,100,((file_length in samples/32) * pattern_number),(a user-specified duration))
..and I'm done. No note off to worry about no offset to worry about
SO how would I do this in HISE?
-
oh and the blog is:
ERR_CONNECTION_TIMED_OUT
So I cant read you Regex post.
-
@Lindon Yup the blog link has been broken for some time, but all of the blog entries were moved to the forum under the blog category
-
@Lindon said in playNoteWithStartOffset:
This is all pretty easy to do in Kontakt... Kontakt will tell me the file_length in samples when I want it,
HISE has
AudioSampleProcessor.getSampleLength()
which might be useful here. -
@d-healey Thanks dave. I will give this a try.. so one bit sorted now how to offset dynamically..
OK looking at it I have accss to :
Sample Start
Sample Endand I have SetSampleRange - what does this do?
can I use this call dynamically ? So..
myAudioSampleProcessor.setSampleRange( (file_length_in_samples/32) *2, (file_length_in_samples/32) *3); myNoteID = playNote(60,100);
-
bump - still looking for answers about this last question...
-
No, changing the sample start like this would affect all ringing voices so it's a rather nasty hack.
I need to supply you with a proper workaround for the looper module. Given the fact that it's the only module that benefits from a sample start > 65536, it's a sensible addition.