How to Calculate base resistor for transistor

I know how to calculate the base resistor for a transistor to bias it, usually we get the lowest hfe value so even in the worst condition, our transistor will get biased. I want to build a spectrum analyser, I'm planning to get the audio signal from input then amplify it in the range of 0-5v. I have already built the amplifier.

The remaining thing is to do the shift register + transistor circuit. I already had BD136 PNP transistors lying around So I will use them. I know they are a over kill. I already have 74HC595 so I will be using 8 blue leds per a column. LED has 30mA app, so I'm stuck here to calculate the base bias resistor value. Should I be use 30mA or 240mA for the calculation? As 30mA for the lowest LED, and 240mA for 8LEDs

Please show a circuit diagram.

The transistor is used for switching the output LED array?

In which case hfe is irrelevant, as you are not using the transistor in its linear range.

Set the base current to about 5 to 10% of the collector current, and it will saturate properly when
used as a switch.

Is the transistor sourcing current for one LED or for 8 LEDs? If the former its collector current should
be 30mA, if the latter 0.24A. Base current would be about 2.5mA or 20mA, so 1.8k or 220 ohms.

You need to give each LED the right current limiting resistor of course.

As its PNP it has to be used as a high-side switch, ie emitter to 5V.

MarkT:
The transistor is used for switching the output LED array?

In which case hfe is irrelevant, as you are not using the transistor in its linear range.

Set the base current to about 5 to 10% of the collector current, and it will saturate properly when
used as a switch.

Is the transistor sourcing current for one LED or for 8 LEDs? If the former its collector current should
be 30mA, if the latter 0.24A. Base current would be about 2.5mA or 20mA, so 1.8k or 220 ohms.

You need to give each LED the right current limiting resistor of course.

As its PNP it has to be used as a high-side switch, ie emitter to 5V.

give me some time and I will post a diagram. yes, I plan to have at least 16 rows, so every row contains 8 leds, according to the audio signal arduino will do FFT and will controls the leds. So at a time it could be 1 led or 8 leds in a column

That's 8 LEDs then. The fact some might not be on is irrelevant as you have to calculate for worst-case load.

MarkT:
That's 8 LEDs then. The fact some might not be on is irrelevant as you have to calculate for worst-case load.

ah, so then I should calculate for 8 leds then. thank you so much for the help