Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAMPLER: no sample assigned #3

Open
rudiars opened this issue Dec 29, 2024 · 7 comments
Open

SAMPLER: no sample assigned #3

rudiars opened this issue Dec 29, 2024 · 7 comments

Comments

@rudiars
Copy link

rudiars commented Dec 29, 2024

i was create a sample set on folder /sample which contain
SAMPLER.INI
065_F#2_Mid.wav

and here inside my SSAMPLER.INI :

[sampleset]
title = sample
type=melodic
normalized=true
amplify = 1.2

template = NUMBER_NAMEOCTAVE_VELO

but still got SAMPLER: no sample assigned
please help

@copych
Copy link
Owner

copych commented Dec 29, 2024

Hello @rudiars, try this sampler.ini:

[sampleset]
title = My First Sample 
type=melodic 
normalized=true 
amplify = 1.2
 
attackTime = 0.0
decayTime = 0.05
releaseTime = 0.1 
sustainLevel = 1.0
 
[filename]
template=<NUMBER>_<NAME><OCTAVE>_<VELO>

; for example, if you have 3 velocity layers
veloVariants = Low,Mid,High

; in addition you can provide optional info on how velocity layers shall be spread over
; the whole range of 0-127, giving the upper limits of each range
;veloLimits = 46,104,127

@rudiars
Copy link
Author

rudiars commented Dec 31, 2024

ok it's work thanks, and now how to play sample in loop until note off ?

@copych
Copy link
Owner

copych commented Jan 1, 2025

It is not implemented yet. But the whole file looping is possible with the current architecture.

@rudiars
Copy link
Author

rudiars commented Jan 6, 2025

It is not implemented yet. But the whole file looping is possible with the current architecture.

I have got the loop point data from the sample file and put it in a variable:
smp.loop_mode = 1; smp.loop_first_smp= start;
smp.loop_last_smp = end;

seems to just stop here

if (_loop) {
DEBF("loop_first_smp : %d\r\n", _sampleFile.loop_first_smp);
DEBF("loop_last_smp : %d\r\n", _sampleFile.loop_last_smp);
if (_sampleFile.loop_first_smp >=0 ) {
_loopFirstSmp = smpFile.loop_first_smp;
} else {
_loopFirstSmp = 0;
}
if (_sampleFile.loop_last_smp >=0 ) {
_loopLastSmp = smpFile.loop_last_smp;
} else {
_loopLastSmp = _bytesToPlay / _fullSampleBytes - 1;
}
_loopFirstSector = (smpFile.byte_offset + _fullSampleBytes * _loopFirstSmp ) / BYTES_PER_SECTOR;
_loopLastSector = (smpFile.byte_offset + _fullSampleBytes * _loopLastSmp ) / BYTES_PER_SECTOR;

}

@rudiars
Copy link
Author

rudiars commented Jan 6, 2025

_loopFirstSector and _loopLastSector variables don't seem to be used yet

@copych
Copy link
Owner

copych commented Jan 6, 2025

I haven't implemented any sample looping yet, but for this project it is only possible to loop the whole sample. It is not a problem to read loop region(s) from the wav file, but I haven't yet invented a way to loop a random region, because I use pre reading from the SD card and with looping I don't know in advance what part of the file to read.

@rudiars
Copy link
Author

rudiars commented Jan 6, 2025

how to looping file ? I try [range] repeat = true but no effects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants