Comments (8)
No problem! I've been having a lot of fun with this. Youtube recommended your SFNode presentation a few days ago and I've been sharing that around a bit. Keep it up!
from scribbletune.
Sorry for the confusion. scribble.modes
is not a method. It s a property. Can you try console.log(scribble.modes)
instead and see if you are getting the list of modes/scales?
There is a method called scribble.mode()
- mode not modes. Maybe that s the one you wanted?
from scribbletune.
Oh whoops. That's a typo. I meant scribble.mode()
. I tested with scribble.mode()
.
On that note though, the documentation does say "You can list the available modes by invoking the modes
method."
from scribbletune.
I see! Good catch... So other than the documentation, is there an issue in invoking scribble.mode()
or scribble.modes
?
from scribbletune.
BTW, scribble.mode()
should be called with the root and the mode you want at least. For e.g. scribble.mode('c', 'ionian')
. However, as per what we pushed last night, v0.10.0, we can directly do scribble.mode('c ionian')
OR scribble.scale('c major')
from scribbletune.
scribble.mode()
works fine when you explicitly specify the root and mode. However, looking before 1a6cb73,
scribble.mode(undefined, undefined, undefined)
returns a C Major scale on octave 3. The documentation indicates this use:
// Create a clip that plays the middle C
var cMajor = scribble.scale(); // [ 'c3', 'd3', 'e3', 'f3', 'g3', 'a3', 'b3', 'c4' ]
This code (which sets those defaults) has no effect because if root
or mode
are undefined, we'll get a TypeError trying to call match()
or an AssertionError checking that mode
exists.
And maybe that should be removed so that the user has to be explicit always, but then there should be a more explicit assertion with the arguments, and it should be removed from the documentation.
Otherwise, moving it to the top of the function should allow for those default values again. (Also the default is octave 4 now. To be super nitpicky and annoying.)
from scribbletune.
Ah I see! Last night's push caused this. I ll fix this such that mode() without any params continues to return the C Major scale.
from scribbletune.
Thank you so much for going through the code and the commits to unearth this!
from scribbletune.
Related Issues (20)
- Out of sync docs? HOT 1
- The five chord in minor scale is "m"
- Error on the https://scribbletune.com/documentation/max webpage HOT 3
- Feature idea: Stream midi HOT 3
- Triplets problem? HOT 6
- hyphen doesnt work in v4 anymore HOT 1
- '-' in rhythmic pattern language acting weird in the new version HOT 1
- Notes in clip are always 1 octave lower than specified HOT 4
- Is it possible to merge 2 clips? HOT 3
- Deprecated LOM method in max.ts HOT 8
- slight imprecisions when generating short notes with max.ts
- Cannot read properties of undefined (reading 'getSeqFn') HOT 12
- `ClipParams`, `NoteObject` types not found
- Why is the “startClip” delayed? HOT 1
- Facing issue importing the module HOT 3
- `types` should point to `./dist/index.d.ts` now HOT 4
- Are triplets supported? HOT 3
- Feature Request: Bring back the Tonal export HOT 3
- [FEEDBACK REQUESTED]: ScribbleTune API-features for a command line interface. HOT 1
- Outdated Documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scribbletune.