Comments (1)
Hi! Thanks for your interest :)
I think the issue in your case is the play
function: it is only intended to convert melodies into Music
values, which is what prog
does with progressions. In very simplistic terms, you have:
Progression
: the abstract type for chord progressions.Music
: the main data type which performs the rule-checking.Score
: type of MIDI tracks which can be exported into MIDI files.prog :: Progression -> Music
: function to convert abstract progressions into concreteMusic
values.defScore :: Music -> Score
: function to convertMusic
values into exportable MIDI tracks.
Hence you only need
p = defScore $ prog $ ph_IVI ton dom_V ton :+ cadence (full subdom_IV auth_V7_I)
As an aside, play
was renamed to start
in the latest release (which I just added) to avoid confusion with the live playback functions.
Once you have a Score
(by applying defScore
or the more general score construction functions to a Music
value), you can use renderScore
to render it into a MIDI file (that part of your program seems correct).
Thanks for the kind words! I do agree that type-level hackery is a bit risky – it's quite easy to break stuff and output an enormous and scary error message. However, it's quite nice when it works! I am considering rewriting Mezzo on the term level (or even TH, as you suggest) in the future to compare the benefits and drawbacks of the two approaches (though this will have to wait as I need to concentrate on a different project this year).
I hope this helped!
from mezzo.
Related Issues (4)
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 mezzo.