tidalcycles / tidal-midi

This package and method of using MIDI in Tidal is obsolete. Please use SuperDirt MIDI instead.
GNU General Public License v3.0
74 stars 36 forks source link

Building/Installing on Mac OSX fails #6

Closed kmorrill closed 8 years ago

kmorrill commented 8 years ago

REPRO 1) running Mac OSX 10.11.3 2) follow instructions at http://tidal.lurk.org/getting_started.html#tidal-on-mac-os-x for setting up tidal 3) run cabal install tidal-midi

EXPECTED: successful install

ACTUAL: output of the package install is...

Resolving dependencies... Configuring tidal-midi-0.1... Building tidal-midi-0.1... Failed to install tidal-midi-0.1 Build log ( /Users/kevin/.cabal/logs/tidal-midi-0.1.log ): Configuring tidal-midi-0.1... Building tidal-midi-0.1... Preprocessing library tidal-midi-0.1... [ 1 of 12] Compiling Sound.Tidal.MIDI.Control ( Sound/Tidal/MIDI/Control.hs, dist/build/Sound/Tidal/MIDI/Control.o )

Sound/Tidal/MIDI/Control.hs:13:34: Not in scope: type constructor or class ‘S.OscShape’ Perhaps you meant ‘S.Shape’ (imported from Sound.Tidal.Stream)

Sound/Tidal/MIDI/Control.hs:19:6: Not in scope: data constructor ‘S.OscShape’ Perhaps you meant ‘S.Shape’ (imported from Sound.Tidal.Stream)

Sound/Tidal/MIDI/Control.hs:19:18: ‘S.path’ is not a (visible) constructor field name

Sound/Tidal/MIDI/Control.hs:21:18: ‘S.timestamp’ is not a (visible) constructor field name

Sound/Tidal/MIDI/Control.hs:21:32: Not in scope: data constructor ‘S.MessageStamp’

Sound/Tidal/MIDI/Control.hs:24:18: ‘S.namedParams’ is not a (visible) constructor field name

Sound/Tidal/MIDI/Control.hs:25:18: ‘S.preamble’ is not a (visible) constructor field name cabal: Error: some packages failed to install: tidal-midi-0.1 failed during the building phase. The exception was: ExitFailure 1

lennart commented 8 years ago

We just updated tidal to 0.7 and tidal-midi is not up to date. Basic MIDI support is included in the new tidal 0.7 and we will port the volca series to work with 0.7.

Which device do you want to control via MIDI?

kmorrill commented 8 years ago

I don't have an external midi device. I am just trying to follow along with some of the example videos on the site, and most of them show using midi.

Sorry, I am very noob. I ideally just want to get this running purely with my PC. Am I on the right track?

Sent from my iPhone

On Feb 21, 2016, at 2:08 AM, Lennart Melzer notifications@github.com wrote:

We just updated tidal to 0.7 and tidal-midi is not up to date. Basic MIDI support is included in the new tidal 0.7 and we will port the volca series to work with 0.7.

Which device do you want to control via MIDI?

— Reply to this email directly or view it on GitHub.

s-ol commented 8 years ago

@lennart the the Tidal info page should be updated: http://tidal.lurk.org/howtos.html#midi (and this issue closed).

How does one connect to MIDI devices now though? I started a digital MIDI controlled (cadence-xycontroller) and hooked it up to the system MIDI (in and out) but with my poor Haskell understanding Im having trouble figuring out how to connect to it (keyproxy like in the howo linked above doesn't seem to exist anymore).

s-ol commented 8 years ago

ah, I figured it out:

import Sound.Tidal.MIDI.Device
import Sound.Tidal.MIDI.Control
import Sound.Tidal.MidiStream
import Sound.Tidal.FL

devices <- midiDevices

c1 <- midiStream devices "Midi Through Port-0" 1 synthController

c1 $ note "50 50 51"
  # dur "0.2"
  # expression sinewave1

@lennart is there a way to get midi Input as a pattern?

lennart commented 8 years ago

how would you want midi input to be represented as a pattern?

s-ol commented 8 years ago

well for example with a simple controller like cadence-xycontroller I would like to have the X and Y axis as Pattern Double like sinewave... I would imagine it something like this?

midiin <- midiInputStream devices "Midi Through Port-0" ????

d1 $ sound "bd" # gain midiin
lennart commented 8 years ago

your code will compile but midiin's value is not going to be update, unless you run midiin <- midiInputStream ... again, and again, which kind of defeats the purpose.

the reason is, that Tidal's pattern functions are what haskell calls pure, they must not contain sideeffects and midiin is supposed to be just that, a sideeffect by you turning a knob on a midi-controller or playing a keyboard.

I tried to get this working, but it was clunky my attempts in this direction are incomplete old and probably won't work with current tidal (https://github.com/lennart/tidal-midi-input and https://github.com/lennart/Tidal-Trigger)

A more general approach to this would be to get something like "bd sn ~ cp" working for arbitrary inputs. In the example, Tidal knows nothing about what "bd" "sn" or "cp" is, other than a string. Just by passing this pattern to sound it gets sent to a receiver that knows what sound "bd" should be. In case of Dirt/SuperDirt it will load and play the sample in the folder called "bd".

One could think of something like d1 $ gain "midiin [~ midiin:2]" # sound "bd" To have gain controlled by a certain midinput. The receiver would have to figure out what this means, e.g. read a controller value from a connected mididevices, or the current temperature of your bathroom, whatever. I made this up, none of this works (yet) but this seems to be more likely to work (although gain currently accepts a pattern of double, so this won't work straightforward).

Feel free to ask, but I guess it might be good post this over at http://tidal.lurk.org since I'll close this pull request.

kindly, Lennart