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

Out of sync docs? #137

Open
JestDotty opened this issue Oct 17, 2020 · 1 comment
Open

Out of sync docs? #137

JestDotty opened this issue Oct 17, 2020 · 1 comment

Comments

@JestDotty
Copy link

trying to figure out how to make generated audio without extra software right now.

this video clip: https://www.youtube.com/watch?v=6Ru2H-IrOWU shows clip can have an argument of instrument, but your docs don't mention it https://scribbletune.com/documentation/core/clip

In general I'm finding this library short on example usages or info so I'm having a difficult time figuring it out. It seems too complex to get it to "work" from example code to audio even once?

@walmik
Copy link
Collaborator

walmik commented Oct 18, 2020

Thank you for pointing this out @JestDotty ! I will update the docs once I get some time but to unblock you for now, I m sharing some details here.

The instrument parameter is newly updated in Scribbletune and it will replace the synth parameters in the futures. Either ways, it uses a Tone.js instrument and can be use like this

scribble
  .clip({
    instrument: 'Synth',  // string
    pattern: 'xx[xx]', 
    notes: 'C3 Cm-3'
  })
  .start();

The following synths are provided thanks to Tone.js and you can define the instrument by seeing one of the following values as a string:

  • AMSynth
  • DuoSynth
  • FMSynth
  • MembraneSynth
  • MetalSynth
  • MonoSynth
  • NoiseSynth
  • PluckSynth
  • PolySynth
  • Sampler
  • Synth

You could even define the instrument as a Tone.js object like this,

const synth = new Tone.Synth();
scribble
  .clip({
    instrument: synth, 
    pattern: 'xx[xx]', 
    notes: 'C3 Cm-3'
  })
  .start();

and then augment it like this

synth.set({oscillator: {type: "sawtooth"}});

There is yet another way to define synths. You can initialize a Tone.js instrument with a JSON payload that defines the properties of the synth. This is a bit advanced way of doing it, but if you feel like giving it a shot, the play around with some of the "Instruments" here https://tonejs.github.io/examples/ and change their properties. Then click the <> button on the bottom and get hold of the JSON payload and use it here

const synth = new Tone.Synth({<jsonPayload here>});

Screen Shot 2020-10-18 at 12 19 09 AM

Hope this helps for now!

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