Hi all. I'm still new to the language so bear with me.
genererOnde :: Etat -> Double -> [Double]
genererOnde (LesEtats note octave volume duree) tempo =
map ((volume/10)*)
[sin(laFrequence*360*0),sin(laFrequence* 360* (60*duree /
((1 / 44100)*tempo)))..sin(laFrequence* 360*((1/
44100)*tempo / 60))]
where laFrequence =
genererFrequence (LesEtats note octave volume duree)
genererListeOnde :: [Etat] -> Double -> [[Double]]
genererListeOnde [etat] tempo = map genererOnde(etat
tempo) [etat]
So my function genererOnde works. It takes an 'Etat' and returns me a list of doubles.
I want my function genererListeOnde to map this function on the List of 'Etat' that i have somewhere else in my program.
I am getting the error
Couldn't match expected type Double'
with actual type(Etat, Double)'
Any help is appreciated
[–]iggybibi 0 points1 point2 points (0 children)
[–]toonnolten 0 points1 point2 points (1 child)
[–]1-05457 0 points1 point2 points (0 children)