let temperatureScalar = 10
    temperaturePattern = scale "major" (fromList (map (\x -> getNum x temperatureScalar)  (map (\x -> snd x)  (take 10 temperaturedata))) |- 150)
    temperature = fast 4 $ n ("x(3,5)" |> temperaturePattern + "['maj | 'min]" )# s "superpiano" # room 0.5 
    in d1 $ temperature

queryArc (n ("1 2 3 4 5 6 7 8")) (Arc 0 1)

:i fromInteger

:t temperaturedata

length $ listToNum $ getRawValueList $ temperaturedata

plotList [] (zip [0..] (listToNum (getRawValueList $ take 10 temperaturedata)))

:t temperaturedata


selection = listToNum (getRawValueList $ take 10 temperaturedata)

plotPlainList (selection)


let batteryScalar = 5
    batteryPattern = scale "major" (fromList (map (\x -> getNum x batteryScalar)  (map (\x -> snd x)  (sliceList 500 510 batterydata))) |- 150)
    battery = n ("x(3,5)" |> batteryPattern + "['maj | 'min]" )# s "jvbass" # room 0.5 
    in d2 $ battery

battery = n ("x(3,5)" |> batteryPattern + "['maj | 'min]" )
batteryScalar = 5
queryArc battery (Arc 0 2)

queryArc temperature (Arc 0 2.5)

d1 $ fast 10 $ append (n (fromList (map (\x -> fromInteger (round ((getFloat x)*10)))  (map (\x -> snd x)  (take 100 temperaturedata))))) ("~!10") # s "jvbass" # room 0.5 # delay 0.7

d2 $ fast 10 $ n (fromList (map (\x -> fromInteger (round ((getFloat x)*5)))  (map (\x -> snd x)  (take 100 humiditydata)))) # s "arpy" # room 0.5 # delay 0.7

d1 $ trigger $ s "<bd sn*4 bd sn*2>"

d1 $ n ( run 10) # s "v"
:t map (\x -> getMaybeFloat (snd x))  (take 100 temperaturedata)

d1 $ n("c'maj f4'maj'ii g4'maj'i c'maj") # s "superpiano"

d1 $ slow 4 $ n "[1..5]" # s "meteo"

