LED - with peak line - and red warnings...vector version.



  • So I've seen a few posts here asking how to "do" an LED-style control, and there's been a few answers - all of which seemed to require adding in a png for the LED itself.

    So as I needed (or wanted) one of these that used vector drawing, and one that had some level of "red-line" warning as well as momentary peak measurement too I coded one up. You might want to use it - or adapt it to your needs.

    So caveat no.1 : as @ustk has said elsewhere - this is not really a gain meter - its approximates one as it uses 100 milliseconds between each measure - so it may miss some peaks. But in any case:

    HiseSnippet 2093.3oc2Y0uaajaDeks2qwJmARJtCs+IQPAtUWTj2Uw1IFF2EYaI6Hb9CAKmjVTbHfdWJIhrhTXWJ63FXf9H1Gg9HbuA2MjbWsbkWaqSsIMoBIVlbFN727AmYHcmHtOINlGYUZ4SubDwpzWa28RlXvtCvTlU6lVktm8QjKNnUSqctbDNNlDXUpzh6KoVZ4krTe9kWrCNDy7IYSYY8ZN0mb.cHUjMamF+DMLbOb.4T5PCtWqQaeNaWdHeLfjEscsFg8eGtO4HrjsErsJ8UsBnBdTWAVPhsJszN7fK6NfeASy+qowzyBIxAdVcAAomdOdXfDwxYs1c.MLnSpFGaYUxtSl9unV++F6CoAzIymYGdfh.JaEl1iRKbavyyDdtyN7JY.ukzv6g1c8iniDYTjX691sYBRTOL3BLgklWqErtu8tbfCln1P76H6EAClrBmMbcqhV20sxVqTdkxqtJxmObHmghHi.kWPY8QQ7wv2DIcvQEKPmiiPur8As2+kmt6wGb7qNA8CH22+7MWq9NdMWaKS11Y6c+ICd1au5pO43oUy8akimMTexwCDCty1mbZ6CaA73UeZZcjXkDAz5Ml4KnblS+JqT9CqTFgj+GA5SeTHnEfSJRrkdtUW0GG5iNCjQrbZzSPjyIQWhDP.JRLfFif+EP60iDAVuLAAqPIGX+jbUqOQ7RBs+.gSEPFNNdttnGOgzqwgiINUp78Rf5Kpjr6oX.Q6gnhXDFM.DAnDmK4GVMlgBwfNJQSsZIaOvrR9OdZoi9QT17AXAt1.phVkJ5U9A8WIaZDYHY3YvtoTyb6LlE.jiIvNOfnLZnzXgIvP94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WzXDVFxaHzLSTdCgk60LD7F4wYcuMe1y8Vu9lqa86yBYMKJ0Csm5floVs+miZ00uGJbaXdv3PrH+UjkIfRH.GKycWT48MYwTwkl63Gk6MOqv8g1cnB+AEi2EJ.uvA4O13M4UHVwV29PFXWxdu+579jCE+hHt20SNbuIuHDc3nPx9YuHjtRys7hPVVMIg3blt2jOb8u0nf2LpMCt6snCODGMsgew7Z6hyl1VfFtzLGcn5n6Kln4+nsxj+kDfUgDe4.3GXCId+L.t5tt6eHVDQgJG1GMdXWHEuOAfJCpLHauozBxhQ5wtxwR.0kvBTC9U3SBQO43RID8RIZZR9VsI491uAeNQc8Fk03aUi6wiFh1mvHQRak2sjR3eMqOR7nY9QhO1W.P3zHLKdDOl3YJ4onUOetIwXVd10SkiKo5AMXOzfu60Hcx5lSBgE4DFLNmjNjZTf+e+hVLL3z6R.sI33XePYk1Ny3lNigqSqNc3YtvroqaN8KwQAfew+1xW96t5PgOH8W8Y86k+oqMkEmM3VfEbgNW6u3xCRpu1BJ9EBWOXR17d3wghzYyez5PNiOZ.mQy4zOg.YD52mjKVpPEZag.tWa1LeSiSHgDbrwws+RC4Cyfi.6DYNsE2Qk3Ryn+5OaqgKRlO3yqxE+AMrKa+ZvI4K2ccpwzgnIpi2ci1WESNEqfyzcDIWjYtJ0s+y6Xtduoysi4+J8Ou3+G0+7GiTPPMgub574OYC0opiTtaz+682eJZ.5SwdLD6Gwequ9kqjYDumZFPuYp+t2KaenbLxyR8ZVv5rcq4ZMDpq9VeeYL8S.6Swqo9brlmNGqYs4XMqOGqYi4XMOaNVyyu00HaoY6wB9Pc7OLQmVpm3qTIcWcpiBV+FfT1+WL
    

    I'm pretty sure the code could do with re-factoring so I'm always interested in a better version if you want to comment or contribute...



  • @Lindon Nice one, thank you for sharing! 🙂



  • @Lindon
    Wow, Well Done Lindon
    Is There Any Chance To Get This In Horizontal Direction?



  • @Natan - look at the code - see if you can work it out...



  • @Lindon no idea 😞



  • @Lindon Mate Can You Point Me to How I Can Make This Baby Go Horizontal?
    I Can't Figure This Out 😕



  • @Natan - look at the code - see if you can work it out...



  • @Lindon 🙂 No Glory



  • @Natan whihc part do you not understand...?



  • @Lindon Almost None 🙂 And Dont Want To Screw The Code Up 🙂
    Just Point Me To Where I Can Make This Horizontal, I'll Grateful 🙂



  • @Natan ok see if you can see the part the is drawing the box inside the LED control... print it here..



  • @Natan said in LED - with peak line - and red warnings...vector version.:

    And Dont Want To Screw The Code Up 🙂

    You have to. You will only learn by experimenting, breaking things, and fixing them.

    Make a new project, add in the LED meter code, and play with it. When you get stuck, ask for help and show us what you've tried - and I don't expect you to figure it out quickly, it takes time.


Log in to reply
 

17
Online

1.2k
Users

3.8k
Topics

33.5k
Posts