Giter Site home page Giter Site logo

Out of sync docs? about scribbletune HOT 1 OPEN

JestDotty avatar JestDotty commented on June 5, 2024
Out of sync docs?

from scribbletune.

Comments (1)

walmik avatar walmik commented on June 5, 2024

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!

from scribbletune.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.