triss / chordsymbol Goto Github PK
View Code? Open in Web Editor NEWSimple notation for chords in SuperCollider
Simple notation for chords in SuperCollider
Hi,
It's pretty common in SC to have the same method name implemented on value, arrays and patterns (for example: .midicps). Currently, the method has a different name if applied on Symbol or SequenceableCollection. A method for Pattern would by also handy (implemented as pattern.collect({ arg x; x.asDegrees }))
Implementing on DemandUgens like Dseq would be really nice, but I don't know if it's possible or how to do it.
Thanks
In the code, there are various comments about replacing keyToDegree2
by keyToDegree
(and removing performKeyToDegree2
).
The comment says:
// TODO won't be required in next SC release see pull request #1164
So I was thinking about making a PR on this repo to remove this (six years have passed ;-), but as far as I can tell, nothing has changed in SC related to this...your SC submissions from 2014 (1163 and 1164) were unfortunately never integrated into SC.
I know it's related to using offsets of 0.1 vs 0.5 for flattened and sharpened degrees:
ChordSymbol.asDegrees(\Cm7) // (uses keyToDegree2; same as:)
ChordSymbol.asNotes(\Cm7).collect(_.keyToDegree2(Scale.major))
// --> [ 0.0, 1.1, 4.0, 5.1 ]
ChordSymbol.asNotes(\Cm7).keyToDegree(Scale.major)
// --> [ 0.0, 1.5, 4.0, 5.5 ]
And if we were to use the existing keyToDegree
, then the resolution of those degrees (by the note Event) would return bad notes...
n = [0, 3, 7, 10];
Pbind(\degree, Pseq(n.collect(_.keyToDegree2(Scale.major)))).asStream.all(Event.default).do(_.use{"deg: % note: %".format(~degree, ~note.value).postln});
// deg: 0.0 note: 0.0
// deg: 1.1 note: 3.0
// deg: 4.0 note: 7.0
// deg: 5.1 note: 10.0
Pbind(\degree, Pseq(n.keyToDegree(Scale.major))).asStream.all(Event.default).do(_.use{"degree: % note: %".format(~degree, ~note.value).postln});
// degree: 0.0 note: 0.0
// degree: 1.5 note: -1.0
// degree: 4.0 note: 7.0
// degree: 5.5 note: 6.0
Maybe the comments should just be updated to state why keyToDegree2
is needed, and no longer suggest that it will be replaced by keyToDegree
imminently (it seems it won't be!).
Different calculation required.
[0, 1.5] -> \c_32 - not always possible?
WARNING: Extension in 'C:\ProgramData\SuperCollider\Extensions\ChordSymbol-master\classes\ChordSymbol.sc' overwrites Symbol:isRest in main class library.
Intentional overwrites must be put in a 'SystemOverwrites' subfolder.
How can I avoid having that error?
Your class works like a charm tho :)
Thank you for developing that! :)
Should this warning be fixed, or is it the extension's normal behaviour?
WARNING: Extension in '/Library/Application Support/SuperCollider/downloaded-quarks/ChordSymbol/classes/ChordSymbol.sc' overwrites Symbol:isRest in main class library. Intentional overwrites must be put in a 'SystemOverwrites' subfolder.
So link doesn't worj
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.