ctford / leipzig Goto Github PK
View Code? Open in Web Editor NEWA music composition library for Clojure and Clojurescript.
License: Other
A music composition library for Clojure and Clojurescript.
License: Other
I'm seeing the identical problem reported in this google group chat:
https://groups.google.com/g/overtone/c/jF_9U-MkEBI
Everything on the overtone and leipzig side is working with no errors (all functions return a value). However, the (live/play) call returns a Future which includes a map that claims the track is :pending. This happens both in the repl and when C-c inside of a cider buffer. The example i'm using is the leipzig from scratch file, so this should work. Thanks so much and I'm looking forward to using Leipzig.
insane-noises.leiptest> (live/play track)
#<Future@4dd38521: :pending>
Hi there, I am really digging this library but I am having a bit of a hard time using it with stringed instruments. I tried to write an example based on the overtone stringed synth examples here but it is not clear to me how I could express the chords in a more elegant way. Any ideas or suggestions?
I'm not sure if this is an issue or just my misunderstanding. I'm trying to implement a "retrograde" function that will reverse a melody. I think I should be able to do something along the lines of (->> the-phrase crab (simple the-phrase-length)), but that doesn't quite work. I hope you can set me straight here.
Consider a simple example of a whole note followed by two half notes:
> ((lc/simple (- 2 0.5)) (lc/crab (lm/phrase [1 0.5 0.5] [4 5 6])))
({:pitch 4, :duration 1, :time 1.5}
{:pitch 5, :duration 0.5, :time 0.5}
{:pitch 6, :duration 0.5, :time 0.0})
That almost works. Note 6 & 5 start at 0 and 0.5, but Note 4 is at time 1.5? Shouldn't it be at time 1?
I drew this out and it finally made sense to me. I think there is a missing step
;; -2 -1 0 1 2
;; --|-+-|-+-|-+-|-+-|
;; AaaaBbCc = start with whole note + 2 half-notes
;; cCbBaaaA = crab? no...we don't play notes backwards
;; CcBb Aaaa = actual crab result when notes actual durations
;; CcBbAaaa = a missing step: offset-each-by-duration
;; CcBbAaaa = (simple 2) puts melody in proper location
Do you agree there's an issue? Or is this just a misunderstanding on my part?
Thanks in advance...
--Roger
Leipzig's dependence on Overtone is very slim - at
and now
. If we provide equivalents for CLJS, then Leipzig should be able to support music in the browser, using web audio instead of Overtone synths.
Hi,
Just to inform you, something I faced a bit earlier when trying to setup Overtone in LightTable on Windows (8) 64bit. Normally I run a ArchLinux setup in virtualbox guest on this machine but due to a cracking sound, I had to switch back to the host Win. The problem I faced was java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.NativeLong
exceptions thrown and the solution was found in https://groups.google.com/forum/#!topic/overtone/orbm9ZEtZaE group.
Basically what it boils down to, from what I understand, is that overtone.live
can't be used/called in Windows 64bit. It is not just limited to LightTable, lein repl
throws the same. Falling back to overtone.core
and then using (boot-external-server)
everything run smoothly though and, from what I read, seems to be the prefered method of dealing with this issue.
Perhaps something to take into account for leipzig as I noticed you made use of it in leipzig.live
and mention it in the how-to of the README file.
Velocity is also an important part of music. It would be great if notes were represented like this:
{:time 0
:pitch 67
:velocity 127
:duration 2
:part :melody}
hello,
I have been making some music with leipzig and I'm loving the library, but I would like to sync some live visuals to my music with quil. Is there a way to do this with leipzig?
Was playing around with leipzig again this evening and found myself wanting a "full stop" helper.
I noticed I can capture the play future and stop it like this:
(def player (->> drums (times 4) play))
(future-cancel player)
But I get the feeling something like
(leipzig.live/stop)
that canceled all play futures could be handy if you happen to kick off a somewhat long sequence.
melody/duration
measures the duration of a melody.
This goes wrong if e.g. the second-last note is long enough that it lasts beyond the last note e.g. [{:time 0 :duration 4 :pitch 0} {:time 1 :duration 1 :pitch 2}]
. We need to use a max strategy rather than just looking at the final note (which we can only rely on starting last).
When using Leipzig, I'm noticing that deps are rather old and include both Clojure and Clojurescript. Maybe they both could be a :provided
dependency, so you don't get them when consuming the library?
as in below example
(->>
(phrase [3/3 3/3 2/3 1/3 3/3] ; Can you recognise the tune yet?
[ 72 72 72 74 76])
(then
(phrase [2/3 1/3 2/3 1/3 3/3]
[ 76 74 76 77 79])))
it becomes below with out the ->>
macro
(then
(phrase [2/3 1/3 2/3 1/3 3/3]
[ 76 74 76 77 79])
(phrase [3/3 3/3 2/3 1/3 3/3] ; Can you recognise the tune yet?
[ 72 72 72 74 76]))
I find it pretty weird. why the phrase played later comes first?
if we reverse the order of argument then can take phrase in order without using ->>
or if using threading macro is desired, then can use ->
macro.
I wonder why it is made like this currently and if you want to change it? I could try to pull off pull request if you want to change it.
Thanks.
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.