0

I am trying to play specific audio files multiple times together, and I found that the sampler has the triggerAttack() method which plays perfectly

The problem with the Player class is that the start() method stopps whatever the player was already playing. Is there any way to work around this other than to tediously map every file to its own note or making a sampler for each individual file?

For me, I have many different individual audio files that I want to be able to play multiple times without cutting its sounds off, and it would be very convenient to have a Players.player(name).play() method

An easy example of my problem would be trying to make a shepard tone/scale with a single audio file that has the scale. Can Tone.Player make that work? If so how?

My problem would also be fixed if the samplers MIDI note to URL map is the same as triggerAttack(number)

I tried:

    var sampler = new Tone.Sampler({
    urls: {
        "1":"/path/test.wav",
        "2":"/path/other.wav"
        //more files
    },
    }).toDestination();

    sampler.triggerAttack(1)

and the problem is triggerattack does not play test.wav in its normal pitch (its triggerAttack(4.6) or something like that) which I also dont understand

Ar25k
  • 11
  • 1

0 Answers0