All Projects → newlandsvalley → purescript-school-of-music

newlandsvalley / purescript-school-of-music

Licence: MIT license
Port of the Haskell School of Music to Purescript

Programming Languages

purescript
368 projects
Dhall
116 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to purescript-school-of-music

Abcjs
javascript for rendering abc music notation
Stars: ✭ 1,141 (+5333.33%)
Mutual labels:  music-player, midi, music-notation
NegativeHarmonizer
A python tool to invert the tonality (a.k.a negative harmony) of midi notation
Stars: ✭ 23 (+9.52%)
Mutual labels:  midi, music-notation
Textbeat
🎹 plaintext music sequencer and midi shell, with vim playback 🥁
Stars: ✭ 274 (+1204.76%)
Mutual labels:  midi, music-notation
Awesome Music
Awesome Music Projects
Stars: ✭ 925 (+4304.76%)
Mutual labels:  midi, music-notation
arm synth
Wavetable Synth Running on an STM32F 32-bit ARM Cortex M3 microprocessor
Stars: ✭ 23 (+9.52%)
Mutual labels:  midi, polyphonic
LabMidi
Midi IN and OUT. Standard midi file parser and player. Midi Softsynth implementation.
Stars: ✭ 38 (+80.95%)
Mutual labels:  music-player, midi
Mezzo
A Haskell library for typesafe music composition
Stars: ✭ 327 (+1457.14%)
Mutual labels:  midi, music-notation
PicoAudio.js
A JavaScript library for playing MIDI (Standard MIDI File) on Web.
Stars: ✭ 28 (+33.33%)
Mutual labels:  music-player, midi
embed-client
🎼 Sheet Music & Tabs Embed JavaScript Client
Stars: ✭ 43 (+104.76%)
Mutual labels:  music-player, music-notation
ANMP
multi-channel loopable video game music player for nerds and audiophiles
Stars: ✭ 16 (-23.81%)
Mutual labels:  music-player, midi
Webaudiofont
Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
Stars: ✭ 600 (+2757.14%)
Mutual labels:  music-player, midi
Html Midi Player
🎹 Play and display MIDI files on the web
Stars: ✭ 158 (+652.38%)
Mutual labels:  music-player, midi
YuMusic
A Music Player Build with JavaFX WebView, iView,RequireJS
Stars: ✭ 17 (-19.05%)
Mutual labels:  music-player
Kanon
Open Source Player for Raumfeld Multiroom Devices based on VueJS + Electron.
Stars: ✭ 12 (-42.86%)
Mutual labels:  music-player
deezer
Deezer Archlinux AUR package
Stars: ✭ 42 (+100%)
Mutual labels:  music-player
ManosOsc
(Eyebeam #13 of 13) Output OSC, MIDI, and After Effects/Maya animation scripts from the Leap Motion controller.
Stars: ✭ 53 (+152.38%)
Mutual labels:  midi
MidiJack
MIDI input / output plugin for Unity
Stars: ✭ 19 (-9.52%)
Mutual labels:  midi
MIDISequencerAUv3
A great start point for making AUv3 MIDI sequencer apps.
Stars: ✭ 24 (+14.29%)
Mutual labels:  midi
midiplayer
Play MIDI file right in your browser with the WebMIDIAPI
Stars: ✭ 53 (+152.38%)
Mutual labels:  midi
musicWebTemplate
Free website template built for musicians / artists to promote their music and connect to their audience.
Stars: ✭ 26 (+23.81%)
Mutual labels:  music-player

Purescript School of Music (PSoM)

Latest release

Build Status

Try it out here.

This is another attempt at porting the music notation part of the Haskell School of Music (HSoM) to the browser. It consists of a PSoM library (ported from HSoM) together with an editor that runs in the browser. This allows you to enter melodies using a DSL and then play them.

It follows an abortive attempt in Elm in conjunction with danigb. This failed largely because of the lack of type classes in Elm but also because of the time delays inherent in Elm's port system when requesting that a sound should actually be played.

Supported Instruments

PSoM uses instruments from Benjamin Gleitzman's soundfont library which are enumerated in purescript-midi. It recognizes all the instruments listed here. The names differ slightly from those originally used by HSoM - the mapping between the two is shown here. MIDI allows up to 10 such instruments to be available for any given melody.

DSL

Melodies are presented to the browser using a DSL which has been designed to be as close as possible to the API itself.

Editor

The editor has been developed using Halogen and allows you to enter PSoM text and will parse the text after every keystroke. If it is valid, a player will appear, otherwise an error message is shown. On startup, it loads a pre-selected set of instrument soundfonts which you can later change if you prefer. It also allows you to import an ABC file as PSoM and to load or save the PSoM text.

Polyphonic ABC Player

This is now deprecated in favour of share-a-tune which has used this code as a starting point and then added tune URL sharing facilities.

Try it here.

The player is essentially identical to the editor in that, when the ABC is loaded, the tune can be played and the score viewed. Monophonic tunes just play normally. However, if the tune is polyphonic, the user can choose to play the entire polyphonic melody or just one of the parts. The scores for the various parts are displayed separately.

Because the transformation to PSoM is relatively expensive, there is no editor window. It would no longer be possible to update the melody and the score after each keystroke and have reasonable responsiveness.

To build

 spago build

To test

 npm run test 

To build the Halogen editor

 npm run halogen-editor

and then navigate to halogen-editor/dist/index.html

To build the polyphonic player

 npm run polyphonic-player

and then navigate to polyphonic-player/dist/index.html

Design Questions

DSL

What features would make the DSL pleasant and convenient to use?

Volume

What would be a sensible default value for a note volume (currently 100)?

To Do

  • Allow variable definitions to refer to other variables defined earlier in the same scope
  • Add quickcheck style tests to the PSoM library

The following control mechanisms are unimplemented because they also have not been implemented in HSoM:

  • Custom
  • KeySig
  • Ornamentation
  • Articulation other than Staccato, Legato and Slurred

Questions on the HSoM Implementation

There seem to be various problems surrounding volume in MEvent. Perhaps it is because I am using only a MIDI backend which has a maximum volume setting of 7F (127). Firstly, crescendos seem to start at this volume level, although diminuendos are OK. Secondly, the Loudness implementation seems correctly to set the volume in the context but then to ignore it, taking the volume only of the original note.

The various articulations don't seem to work properly. Not sure yet if it's a bug in HSoM or in the translation to PureScript.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].