import Text.Read
import Data.Maybe
import TemperatureData
import HumidityData
import BatteryData


d1 $ s "bd"

getNum value scalar = fromInteger $ round $ (maybe 0.0 id (readMaybe value :: Maybe Float)) * scalar
let temperatureScalar = 10
d1 $ fast 10 $ n (fromList (map (\x -> getNum x 10)  (map (\x -> snd x)  (take 100 temperaturedata))) |- 120 )  # s "superpiano"

d1 $ fast 10 $ n (fromList (map (\x -> fromInteger (round ((getFloat x)*10)))  (map (\x -> snd x)  (take 100 temperaturedata)))) # 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


:t map (\x -> getMaybeFloat (snd x))  (take 100 temperaturedata)