jmap (Type value0To1, Type targetRangeMin, Type targetRangeMax)
These three values must have the same type:
correct: jmap(1.0, 0.2, 0.3)
wrong: jmap(1, 0.2f, 0.3)
BTW, it seems that you may misunderstand the function jmap (what is the value generated by rand()? Is it an integer?). Maybe you should check the documentation again. You may also consider std::uniform_real_distribution.
Instead of rand() use juce::Random. The nextFloat() function returns a value between 0 and 1, so you’d do random.nextFloat() * 2.0f - 1.0f to get a value between -1 and 1.